﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            var UserName = textBox1.Text;
            var Passward = textBox2.Text;
            var LPassward = textBox3.Text;

            var Laixuerong = string.IsNullOrEmpty(UserName);
            var Larxurrong = string.IsNullOrEmpty(Passward);
            var XPassward = Passward == LPassward;

            if (!Laixuerong && !Laixuerong && XPassward)
            {
                MessageBox.Show("注册成功！");
                Form1.lai.Add(UserName, Passward);
                this.Close();
            }
            else
            {
                MessageBox.Show("注册失败！");
            }
        }
    }
}
